package com.study.chain.auth.optimize;


import com.study.chain.auth.Member;
import org.apache.commons.lang.StringUtils;

/**
 * Created by Tom.
 */
public class MemberService {

    public void login(String loginName,String loginPass){

        LoginHandler loginHandler = new LoginHandler();
        ValidateHandler validateHandler = new ValidateHandler();
        AuthHandler authHandler = new AuthHandler();
        loginHandler.setNextHandler(validateHandler);
        validateHandler.setNextHandler(authHandler);

        loginHandler.doHandler(new Member(loginName,loginPass));
    }
}
